

import java.awt.Frame;
import java.awt.Scrollbar;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.util.Observable;
import java.util.Observer;

public abstract class SliderGUI implements Observer {

	protected Scrollbar tempControl;
	protected TemperatureController controller = null;
	protected Frame sliderFrame;// = new Frame("Celsius");
	
	public SliderGUI(String frameName, TemperatureController controller, int h, int v, int min, int max) {
		this.controller = controller;
		tempControl =  new Scrollbar(Scrollbar.HORIZONTAL, 0, 10, min, max);
		sliderFrame = new Frame(frameName);
		sliderFrame.add(tempControl);		
		sliderFrame.setSize(250, 50);
		sliderFrame.setLocation(h, v);
		sliderFrame.setVisible(true);
		sliderFrame.addWindowListener(new TemperatureGUI.CloseListener());
	}	
}
